//
// Created by Lenovo on 2025/7/4.
//

#include "Math.h"
#include "Log.h"

int Math::sum(int a, int b) {
    int c = a + b;
    Log::debug(TAG, "sum(), c=%d", c);
    return c;
}

int Math::minus(int a, int b) {
    int c = a - b;
    Log::debug(TAG, "minus(), c=%d", c);
    return c;
}

double Math::divide(int a, int b) {
    if (b == 0) {
        Log::error(TAG, "divide(), b can not be zero");
        return 0;
    } else {
        double c = a / b;
        Log::debug(TAG, "divide(), c=%lf", c);
        return c;
    }
}

int Math::multiply(int a, int b) {
    int c = a * b;
    Log::debug(TAG, "multiply(), c=%d", c);
    return c;
}
